<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> 完善信息 </title>
    <!-- Bootstrap core CSS -->
    <link href="assets/css/bootstrap.css" rel="stylesheet">
    <!--external css-->
    <link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />

    <!-- Custom styles for this template -->
    <link href="assets/css/style.css" rel="stylesheet">
    <link href="assets/css/style-responsive.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<!-- **********************************************************************************************************************************************************
MAIN CONTENT
*********************************************************************************************************************************************************** -->

<div id="login-page">
    <div class="container">

        <form action="/caddinfo" class="form-login" id="addinfoform" style="margin-top: 10px;" method="post">
            <h2 class="form-login-heading" style="background-color:#ff865c;"> 完善信息 </h2>
            <div class="login-wrap">

                <label><span class="text-danger">*</span>用户名 : </label>
                <input name="username" type="text" class="form-control" placeholder="用户名" autofocus required>
                <span class="text-danger"></span>
                <br>
                <label><span class="text-danger">*</span>真实姓名：</label>
                <input name="realname" type="text" class="form-control" placeholder="真实姓名" required>
                <span class="text-danger"></span>
                <!--<br>-->
                <br>
                <div class="">
                    <label><span class="text-danger">*</span>证件类型 ： </label>
                    <input type="radio" name="idtype" value="A" id="idtypea" checked><label for="idtypea">身份证</label>
                    <input type="radio" name="idtype" value="B" id="idtypeb"><label for="idtypeb">护照</label>
                    <input type="radio" name="idtype" value="C" id="idtypec"><label for="idtypec">军人证</label>
                </div>

                <input name="idcard" type="text" class="form-control" placeholder="证件号" required>
                <span class="text-danger"></span>
                <br>
                <label>性别：</label>
                <div class="form-inline form-control">
                    <input type="radio" class="form-inline" value="男" name="gender" checked>男 &nbsp;&nbsp;
                    <input type="radio" class="form-inline" value="女" name="gender">女
                </div>
                <label><span class="text-danger">*</span>生日：</label>
                <input name="birthday" id="birthdaydt" type="date" class="form-control" required >
                <br>
                <label><span class="text-danger">*</span>年龄：</label>
                <input name="age" type="number" class="form-control" required>
                <br>
                <label><span class="text-danger">*</span>手机号：</label>
                <input name="phone" type="tel" class="form-control" placeholder="手机号" maxlength="13" required>
                <span class="text-danger" th:text="${errinfo}"></span>
                <br>

                <button class="btn btn-success btn-block" type="submit"><i class="fa fa-save"></i> 保 存 </button>
                <hr>

                <div class="registration">
                    信息已完善？<a href="/login"> 前往登录 </a>
                </div>
            </div>

        </form>

    </div>
</div>

<!-- js placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap.min.js"></script>

<script>

    $(function () {
        initDate(birthdaydt);
    })

    function initDate(birthdaydt) {
        var today = new Date();
        var year = today.getFullYear();
        var month = today.getMonth() + 1;
        var day = today.getDate();
        if(month < 10){
            month = "0" + month;
        }
        if(day < 10){
            day = "0" + day;
        }
        var iniDate = year+"-"+month+"-"+day;
        $(birthdaydt).val(iniDate);
    }

</script>

</body>
</html>
